home *** CD-ROM | disk | FTP | other *** search
/ PC Format Collection 21 / PC Format CD-ROM Collection 21 (1995-12)(Future Publishing)(GB)[issue 51].iso / resource / pocolib.h < prev    next >
Text File  |  1991-09-20  |  12KB  |  319 lines

  1. /********* User Interface library ***********/
  2. int     printf(char *format, ...);
  3. void    unprintf(void);
  4. void    Qtext(char *format, ...);
  5. int     Qchoice(char **buttons, int bcount, char *header, ...);
  6. int     Qmenu(char **choices, int ccount, char *header);
  7. Boolean Qquestion(char *question, ...);
  8. Boolean Qnumber(int *num, int min, int max, char *header);
  9. Boolean Qstring(char *string, int size, char *header);
  10. Boolean Qfile(char *suffix, char *button, char *inpath, char *outpath, Boolean force_suffix, char *header);
  11. Boolean Qlist(char *choicestr, int *choice, char **items, int icount, int *ipos, char *header);
  12. int     Qcolor(void);
  13. ErrCode Qerror(ErrCode err, char *format, ...);
  14. Boolean RubBox(int *x, int *y, int *w, int *h);
  15. Boolean RubCircle(int *x, int *y, int *rad);
  16. Boolean RubLine(int x1, int y1, int *x2, int *y2);
  17. int     RubPoly(int **x, int **y);
  18. Boolean DragBox(int *x, int *y, int *w, int *h);
  19. void    WaitClick(int *x, int *y, int *left, int *right, int *key);
  20. void    PollInput(int *x, int *y, int *left, int *right, int *key);
  21. void    WaitInput(int *x, int *y, int *left, int *right, int *key);
  22. Boolean GetAbort(void);
  23. Boolean SetAbort(Boolean abort);
  24. void    SetAbortHandler(Boolean (*handler)(void *data), void *data);
  25. Boolean HideCursor(void);
  26. Boolean ShowCursor(void);
  27. Boolean Qscroll(int *choice, char **items, int icount, int *ipos, char **button_texts, char *header);
  28. Boolean UdQnumber(int *num, int min, int max,Errcode (*update)(void *data, int num), void *data, char *fmt,...);
  29. /********* Graphics library ***********/
  30. void    GetSize(int *width, int *height);
  31. void    GetAspectRatio(int *x, int *y);
  32. int     GetColor(void);
  33. void    SetColor(int color);
  34. void    Clear(void);
  35. void    Dot(int x, int y);
  36. int     GetDot(int x, int y);
  37. void    Line(int x1, int y1, int x2, int y2);
  38. void    Box(int x, int y, int w, int h);
  39. void    Circle(int cx, int cy, int radius);
  40. ErrCode Poly(int ptcount, int *x, int *y);
  41. ErrCode Spline(int ptcount, int *x, int *y);
  42. ErrCode Oval(double angle, int xcen, int ycen, int xrad, int yrad);
  43. ErrCode Star(double angle, int xcen, int ycen, int rad);
  44. ErrCode Petal(double angle, int xcen, int ycen, int rad);
  45. ErrCode Rpoly(double angle, int xcen, int ycen, int rad);
  46. ErrCode Spiral(double angle, int xcen, int ycen, int rad, double turns);
  47. ErrCode Fill(int x, int y);
  48. ErrCode FillTo(int x, int y, int to_color);
  49. ErrCode Edge(int color);
  50. void    SetColorMap(int index, int r, int g, int b);
  51. void    GetColorMap(int index, int *r, int *g, int *b);
  52. void    GetScreenColorMap(Screen *s, int *maparray);
  53. void    SetScreenColorMap(Screen *s, int *maparray);
  54. void    GetPhysicalSize(int *width, int *height);
  55. /********* Text library ***********/
  56. void    Text(int x, int y, char *string);
  57. void    WordWrap(int x, int y, int width, int height, char *text);
  58. void    SetJustify(int just);
  59. int     GetJustify(void);
  60. int     StringWidth(char *string);
  61. int     FontHeight(void);
  62. int     TallestChar(void);
  63. void    GetFontName(char *name);
  64. ErrCode LoadFont(char *name);
  65. void    GetFontDir(char *dir);
  66. void    Qfont(void);
  67. /********* Graphics Modes library ***********/
  68. ErrCode SetInk(char *name);
  69. void    GetInk(char *buf);
  70. void    SetInkStrength(int percent);
  71. int     GetInkStrength(void);
  72. void    SetInkDither(Boolean dither);
  73. Boolean GetInkDither(void);
  74. void    SetFilled(Boolean fill);
  75. Boolean GetFilled(void);
  76. void    SetBrushSize(int size);
  77. int     GetBrushSize(void);
  78. void    SetKeyMode(Boolean clear);
  79. Boolean GetKeyMode(void);
  80. void    SetKeyColor(int color);
  81. int     GetKeyColor(void);
  82. void    SetMaskUse(Boolean use_it);
  83. Boolean GetMaskUse(void);
  84. void    SetMaskCreate(Boolean make_it);
  85. Boolean GetMaskCreate(void);
  86. void    SetStarPoints(int points);
  87. int     GetStarPoints(void);
  88. void    SetStarRatio(int ratio);
  89. int     GetStarRatio(void);
  90. void    SetSplineTCB(int t, int c, int b);
  91. void    GetSplineTCB(int *t, int *c, int *b);
  92. void    SetTwoColorOn(Boolean setit);
  93. Boolean GetTwoColorOn(void);
  94. void    SetTwoColor(int color);
  95. int     GetTwoColor(void);
  96. void    SetClosed(Boolean closed);
  97. Boolean GetClosed(void);
  98. void    SetCycleDraw(Boolean cycle);
  99. Boolean GetCycleDraw(void);
  100. Boolean GetMultiFrame(void);
  101. void    SetMultiFrame(Boolean multi);
  102. /********* Turtle Graphics library ***********/
  103. void    Move(double amount);
  104. void    Back(double amount);
  105. void    Left(double angle);
  106. void    Right(double angle);
  107. void    PenUp(void);
  108. void    PenDown(void);
  109. Boolean IsDown(void);
  110. void    MoveTo(double x, double y, double angle);
  111. void    Where(double *x, double *y, double *angle);
  112. void    Home(void);
  113. /********* Time Oriented Function library ***********/
  114. long    Clock1000(void);
  115. void    sleep(double seconds);
  116. void    NextFrame(void);
  117. void    BackFrame(void);
  118. void    SetFrame(int frame);
  119. int     GetFrame(void);
  120. ErrCode SetFrameCount(int count);
  121. int     GetFrameCount(void);
  122. void    PlayFlic(long frames);
  123. void    SetSpeed(int speed);
  124. int     GetSpeed(void);
  125. ErrCode InsertFrames(int count);
  126. ErrCode DeleteFrames(int count);
  127. ErrCode OverTime(ErrCode (*effect)(double time, void *data), void *data);
  128. ErrCode OverAll(ErrCode (*effect)(double time, void *data), void *data);
  129. ErrCode OverSegment(ErrCode (*effect)(double time, void *data), void *data);
  130. void    SetTimeSelect(Boolean is_multi);
  131. Boolean GetTimeSelect(void);
  132. void    SetFSA(int fsa);
  133. int     GetFSA(void);
  134. void    SetSegStart(int frame);
  135. int     GetSegStart(void);
  136. void    SetSegEnd(int frame);
  137. int     GetSegEnd(void);
  138. void    SetStill(Boolean still);
  139. Boolean GetStill(void);
  140. void    SetInSlow(Boolean InSlow);
  141. Boolean GetInSlow(void);
  142. void    SetOutSlow(Boolean OutSlow);
  143. Boolean GetOutSlow(void);
  144. void    SetPingPong(Boolean PingPong);
  145. Boolean GetPingPong(void);
  146. void    SetReverse(Boolean reverse);
  147. Boolean GetReverse(void);
  148. void    SetComplete(Boolean complete);
  149. Boolean GetComplete(void);
  150. /********* Cel library ***********/
  151. Boolean CelExists(void);
  152. void    CelPaste(void);
  153. void    CelMove(int dx, int dy);
  154. void    CelMoveTo(int x, int y);
  155. void    CelTurn(double angle);
  156. void    CelTurnTo(double angle);
  157. ErrCode CelNextFrame(void);
  158. ErrCode CelBackFrame(void);
  159. ErrCode CelSetFrame(int frame);
  160. int     CelGetFrame(void);
  161. int     CelFrameCount(void);
  162. ErrCode CelWhere(int *x, int *y, double *angle);
  163. ErrCode CelGet(int x, int y, int width, int height);
  164. ErrCode CelClip(void);
  165. /********* Swap Screen library ***********/
  166. Boolean SwapExists(void);
  167. void    SwapClip(void);
  168. void    SwapRelease(void);
  169. ErrCode SwapTrade(void);
  170. /********* Optics library ***********/
  171. void    OptClearState(void);
  172. void    OptSetState(struct optState *os);
  173. void    OptGetState(struct optState *os);
  174. void    OptFreeState(struct optState *os);
  175. void    OptClearPos(void);
  176. void    OptSetPos(struct optPos *op);
  177. void    OptGetPos(struct optPos *op);
  178. void    OptClearPath(void);
  179. void    OptSetPath(int ptcount, int *x, int *y);
  180. int     OptGetPath(int **x, int **y);
  181. void    OptFreePath(int **x, int **y);
  182. void    OptDefaultCenters(void);
  183. void    OptContinue(void);
  184. int     OptGetElement(void);
  185. ErrCode OptSetElement(int el);
  186. ErrCode OptToFrame(double time);
  187. ErrCode OptToSegment(int start, int stop);
  188. ErrCode OptToAll(void);
  189. /********* Screen library ***********/
  190. Screen  *GetPicScreen(void);
  191. Screen  *GetSwapScreen(void);
  192. Screen  *GetUndoScreen(void);
  193. Screen  *GetCelScreen(void);
  194. ErrCode AllocScreen(Screen **screen, int width, int height);
  195. void    FreeScreen(Screen **screen);
  196. void    GetScreenSize(Screen *s, int *x, int *y);
  197. void    SetPixel(Screen *s, int color, int x, int y);
  198. int     GetPixel(Screen *s, int x, int y);
  199. void    SetBlock(Screen *s, char *pixbuf, int x, int y, int width, int height);
  200. void    GetBlock(Screen *s, char *pixbuf, int x, int y, int width, int height);
  201. void    IconBlit(char *source, int snext, int sx, int sy, int width, int height, Screen *dest, int dx, int dy, int color);
  202. void    Blit(Screen *source, int sx, int sy, int width, int height, Screen *dest, int dx, int dy);
  203. void    KeyBlit(Screen *source, int sx, int sy, int width, int height, Screen *dest, int dx, int dy, int key_color);
  204. void    CopyScreen(Screen *source, Screen *dest);
  205. void    TradeScreen(Screen *a, Screen *b);
  206. void    PicDirtied(void);
  207. /********* Misc. Functions library ***********/
  208. void    exit(ErrCode err);
  209. void    NewFlic(void);
  210. ErrCode Reset(void);
  211. ErrCode ResizeReset(int width, int height);
  212. int     GetChangeCount(void);
  213. int     PocoVersion(void);
  214. void    Redo(void);
  215. void    Restore(void);
  216. int     rnd(int max);
  217. int     rand(void);
  218. void    srand(int seed);
  219. long    clock(void);
  220. Boolean IsBatchRun(void);
  221. void    PocoChainTo(char *program_path);
  222. /********* Autodesk Animator File library ***********/
  223. ErrCode LoadFlic(char *name);
  224. ErrCode SaveFlic(char *name);
  225. ErrCode LoadPic(char *name);
  226. ErrCode SavePic(char *name);
  227. ErrCode LoadCel(char *name);
  228. ErrCode SaveCel(char *name);
  229. ErrCode LoadPath(char *name);
  230. ErrCode SavePath(char *name);
  231. ErrCode LoadPoly(char *name);
  232. ErrCode SavePoly(char *name);
  233. ErrCode LoadColors(char *name);
  234. ErrCode SaveColors(char *name);
  235. ErrCode LoadTitles(char *name);
  236. ErrCode SaveTitles(char *name);
  237. ErrCode LoadMask(char *name);
  238. ErrCode SaveMask(char *name);
  239. ErrCode SaveScreenPic(Screen *s, char *name);
  240. ErrCode LoadScreenPic(Screen *s, char *name);
  241. /********* (C Standard) FILE library ***********/
  242. FILE    *fopen(char *name, char *mode);
  243. void    fclose(FILE *f);
  244. int     fread(void *buf, int size, int count, FILE *f);
  245. int     fwrite(void *buf, int size, int count, FILE *f);
  246. int     fprintf(FILE *f, char *format, ...);
  247. int     fseek(FILE *f, long offset, int mode);
  248. long    ftell(FILE *f);
  249. int     fflush(FILE *f);
  250. int     getc(FILE *f);
  251. int     fgetc(FILE *f);
  252. int     putc(int c, FILE *f);
  253. int     fputc(int c, FILE *f);
  254. char    *fgets(char *s, int maxlen, FILE *f);
  255. int     fputs(char *s, FILE *f);
  256. /********* (C standard) String library ***********/
  257. int     sprintf(char *buf, char *format, ...);
  258. int     strcmp(char *a, char *b);
  259. int     stricmp(char *a, char *b);
  260. int     strncmp(char *a, char *b, int maxlen);
  261. int     strlen(char *a);
  262. char    *strcpy(char *dest, char *source);
  263. char    *strncpy(char *dest, char *source, int maxlen);
  264. char    *strcat(char *dest, char *source);
  265. char    *strdup(char *source);
  266. char    *strchr(char *source, int c);
  267. char    *strrchr(char *source, int c);
  268. char    *strstr(char *string, char *substring);
  269. char    *stristr(char *string, char *substring);
  270. int     atoi(char *string);
  271. /********* (C Standard) Memory Manager library ***********/
  272. void    *malloc(int size);
  273. void    *calloc(int size_el, int el_count);
  274. void    free(void *pt);
  275. void    *memcpy(void *dest, void *source, int size);
  276. void    *memmove(void *dest, void *source, int size);
  277. int     memcmp(void *a, void *b, int size);
  278. void    *memset(void *dest, int source, int size);
  279. /********* (C Standard) Math library ***********/
  280. double  acos(double x);
  281. double  asin(double x);
  282. double  atan(double x);
  283. double  atan2(double y, double x);
  284. double  ceil(double x);
  285. double  cos(double x);
  286. double  cosh(double x);
  287. double  exp(double x);
  288. double  fabs(double x);
  289. double  floor(double x);
  290. double  fmod(double x, double y);
  291. double  log(double x);
  292. double  log10(double x);
  293. double  pow(double x, double y);
  294. double  sin(double x);
  295. double  sinh(double x);
  296. double  sqrt(double x);
  297. double  tan(double x);
  298. double  tanh(double x);
  299. /********* DOS library ***********/
  300. ErrCode fnsplit(char *path, char *device, char *dir, char *file, char *suf);
  301. ErrCode fnmerge(char *path, char *device, char *dir, char *file, char *suf);
  302. Boolean DosExists(char *filename);
  303. ErrCode DosCopy(char *source, char *dest);
  304. ErrCode DosDelete(char *filename);
  305. ErrCode DosRename(char *old, char *new);
  306. ErrCode SetDir(char *dir);
  307. ErrCode GetDir(char *dir);
  308. int     DirList(char ***list, char *wild, Boolean get_dirs);
  309. void    FreeDirList(char ***list);
  310. void    GetResourceDir(char *dir);
  311. void    GetProgramDir(char *dir);
  312. /********* Global Variable library ***********/
  313. ErrCode GlobalVarGet(char *name, char *value);
  314. ErrCode GlobalVarSet(char *name, char *value);
  315. ErrCode GlobalVarDelete(char *name);
  316. ErrCode GlobalVarFlush(void);
  317. ErrCode GlobalVarFirst(char **name, char **value);
  318. ErrCode GlobalVarNext(char **name, char **value);
  319.